package com.education.welco.controller;


import com.education.welco.pojo.OrderName;
import com.education.welco.service.OrderNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static com.education.common.core.BaseController.writeJSON;

@RestController
@RequestMapping("/ordername")
public class OrderNameController {

    @Autowired
    private OrderNameService orderNameService;

    @PostMapping("/ins")
    public void ins(HttpServletResponse response, OrderName orderName) throws IOException{
        int i = orderNameService.insertOrderName(orderName);
        writeJSON(null,response, "200", "添加成功");
    }

}
